using UnityEngine;

public class ScrollViewMap : MonoBehaviour
{
	public RectTransform rectContent;

	public float minOffset;

	public float maxOffset;

	private void Start()
	{
		EnableCamera();
	}

	private void EnableCamera()
	{
		float num = (float)Screen.width / (float)Screen.height;
		UnityEngine.Debug.Log("aspect:" + num);
		UnityEngine.Debug.Log("Screen.width:" + Screen.width);
		UnityEngine.Debug.Log("Screen.height:" + Screen.height);
		minOffset = ((720f / (float)Screen.height * (float)Screen.width - 60f) / 300f - 10f) * 300f;
		maxOffset = 0f;
	}

	private void Update()
	{
		rectContent.localPosition = new Vector3(Mathf.Clamp(rectContent.localPosition.x, minOffset, maxOffset), rectContent.localPosition.y, rectContent.localPosition.z);
	}
}
